<?php

/*
 * If the current post is protected by a password and the visitor has not yet
 * entered the password we will return early without loading the comments.
 */
if ( post_password_required() ) {
	return;
}
?>

<div id="comments" class="comments-area">

	<?php if ( have_comments() ) : ?>

    <div class="section-title-area">
    	<h2>
            <?php
                $comment_number = get_comments_number();
                $title = ($comment_number > 1)? "Comments" : "Comment";
            ?>
            <span class="section-title">
                <?php echo _e($title, "lskt"); ?>
                <span class="blog-comment-count">
                    <?php echo $comment_number; ?>
                </span>
            </span>
    	</h2>
    </div>

	<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
	<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
		<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
		<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
		<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
	</nav><!-- #comment-nav-above -->
	<?php endif; // Check for comment navigation. ?>

	<ul class="blog-comment">
		<?php
			wp_list_comments("type=comment&callback=lskt_comments");
		?>
	</ul><!-- .comment-list -->

	<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
	<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
		<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
		<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
		<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
	</nav><!-- #comment-nav-below -->
	<?php endif; // Check for comment navigation. ?>

	<?php if ( ! comments_open() ) : ?>
	<p class="no-comments"><?php _e( 'Comments are closed.', 'lskt' ); ?></p>
	<?php endif; ?>

	<?php endif; // have_comments() ?>
    
    <div class="section-title-area">
        <h2><span class="section-title"><?php _e("Leave a comment", "lskt"); ?></span></h2>
    </div>
    <div class="comment-fieldbox">
   	<?php 
        $commenter = wp_get_current_commenter();
        $req = get_option( 'require_name_email' );
        $aria_req = ( $req ? " aria-required='true'" : '' );
        
        $fields = array('author' => '<input class="input-name" type="text" name="author" value="' . esc_attr($commenter['comment_author']) . '"' . $aria_req . ' placeholder="Your name *" required="" />',
                        'email' => '<input class="input-email" type="text" name="email" value="' . esc_attr($commenter['comment_author_email']) . '"' . $aria_req . ' placeholder="Your email *" required="" />',
                        'url' => '<input class="input-email" type="text" name="url" value="' . esc_attr($commenter['comment_author_url']) . '" placeholder="Your website" />');
        
        $args = array('comment_field' => '<textarea class="input-textarea" name="comment" placeholder="Your Comment *" required></textarea>',
                    'fields' => $fields,
                    'title_reply'       => '',
                    'title_reply_to'    => '',
                    'label_submit'      => __("Submit Comment", "lskt"),
                    'comment_notes_after' => '',
                    );
        
        comment_form($args); 
    ?>
    </div>

</div><!-- #comments -->
